<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <link rel="stylesheet" type="text/css" href="https://unpkg.com/spencer-css" />
</head>

<body>
  <div class="m4">
    client-side test for <a href="https://github.com/spencermountain/wtf_wikipedia">wtf_wikipedia</a>
  </div>
  <div class="m2">
    <div>Radiohead members:</div>
    <b class="m2" id="result">loading...</b>
  </div>

  <!-- load minified build -->
  <script src="../builds/wtf_wikipedia-client.min.js"></script>
  <script defer>
    wtf.fetch('On a Friday', { lang: 'en' }).then((doc) => {
      let val = doc.infobox(0).get('current_members')
      let members = val.links().map((link) => link.page())
      document.querySelector('#result').innerHTML = members.join(', ')
    })
  </script>
</body>

</html>